#ifndef CJSONCOMMON_H
#define CJSONCOMMON_H

//Constants

/*
  Prohibits empty names.
  If the name is empty, throws an exception
*/

#define CJSON_NULL_NAMES_RESTRICTED

/*
  if defined jstring = wstring
  if not jstring = string
*/

//#define CJSON_USE_UNICODE

//Common

#include <string>
#include <sstream>

#ifdef CJSON_USE_UNICODE

    typedef std::wstring jstring;
    typedef std::wstringstream jstringstream;
    typedef wchar_t jchar;

    #define J(x) L##x

#else

    typedef std::string jstring;
    typedef std::stringstream jstringstream;
    typedef char jchar;

    #define J(x) x

#endif //CJSON_USE_UNICODE

#define JSON_TRUE  J("true")
#define JSON_FALSE J("false")
#define JSON_NULL  J("null")

#if   defined _WIN32
#define LIB_PRE __declspec(dllexport)
#elif defined __unix__
#define LIB_PRE
#endif

#endif // CJSONCOMMON_H
